package com.example.coreshopapp.http;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Url;

public interface ApiService {
    @GET
    <T> Call<BaseResponse<Object>> get(@Url String url);

    // 通用 POST 请求，传递 JSON 数据
    @POST
    <T> Call<BaseResponse<Object>> post(@Url String url, @Body RequestBody json);

    @POST
    <T> Call<BaseResponse<Object>> post(@Url String url, @Body RequestBody json,@Header("Authorization") String token);
}
